<%--
  Created by IntelliJ IDEA.
  User: if
  Date: 2016/11/10
  Time: 12:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<style>
    .overlay {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background-color: rgba(0,0,0,.8);
        z-index: 1;
    }
</style>
<p>
    <a class="btn btn-primary btn-small" href="javascript:addStaff();">新增员工</a>
</p>
<div id="overlay" class="overlay" style="display: none">
    <div class="m-loader m-4">
        <svg class="m-circular" viewBox="25 25 50 50">
            <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="4" stroke-miterlimit="10"/>
        </svg>
    </div>
    <h3 class="l-text">Loading</h3>
</div>

    <table class="table  table-hover table-toolbar table-bordered table-striped ">
        <thead>
        <tr>
            <th> 序号</th>
            <th>员工姓名</th>
            <th>所属部门</th>
            <th>总分</th>
            <th>相关操作</th>
        </tr>
        </thead>
        <tbody>


        <c:forEach items="${staffPage.content}" var="staff" varStatus="vst">
            <tr>
                <td>${vst.count}</td>
                <td>${staff.staffName}</td>
                <td>${staff.staffDep}</td>
                <td>${staff.staffScore}</td>
                <td>
                    <a href="javascript:toUpdate('${staff.pkId}','${staff.staffName}','${staff.staffDep}');"><i class="glyphicon glyphicon-edit"></i> 修改&nbsp;</a>
                    <a href="javascript:deleteStaff(${staff.pkId});"><i class="glyphicon glyphicon-trash"></i>
                        删除&nbsp;</a>
                </td>
            </tr>
        </c:forEach>


        </tbody>
    </table>
    <c:set var="page" value="${staffPage}"/>
    <%@ include file="/WEB-INF/pages/_pagination.jsp" %>
